package designPattern.composite;

public class Client {
    public static void main(String[] args) {
        //从大到小创建对象
        OrganizationCompoment university = new University("清华大学","中国顶级学校");

        //创建学院
        OrganizationCompoment computerCollege = new College("计科院","计算机学院");
        OrganizationCompoment infoEngineercollege = new College("信息工程学院","信息工程学院");


        //创建各个学院下面的系
        computerCollege.add(new Department("软件工厂","这不就是咱的专业吗！！"));
        computerCollege.remove(new Department("网络工程","一般"));
        computerCollege.add(new Department("计算机科学与技术","不错捏"));


        infoEngineercollege.add(new Department("信息工程","喜喜，这个好学"));
        infoEngineercollege.add(new Department("通信工程","这个不好学啊"));

        //将学院加入到学校
        university.add(computerCollege);
        university.add(infoEngineercollege);

        university.print();
    }
}
